"""
@author: LiuJun
@file: practice.py
@time: 2022/12/11 17:35
"""
from functools import reduce
nums = [1, 2, 3, 4, 5]
print(reduce(lambda x, y: x*y, nums))

print(list(filter(lambda x: x % 3 == 0, range(1, 101))))

print(list(map(lambda x: x*x, range(1,11))))

lst = [1, 4, 5, 9]
print(''.join(map(str, lst)))

s = 'asdf234GDSdsf23'
def f(x):
    return x.isdigit(), x.isdigit() and int(x) % 2 == 0, x.isupper(), x
print(''.join(sorted(s, key=f)))